{% include "public/header.html"%}
<!-- content -->

<div class="content">
    <div class="now">
        {% autoescape false %}
        {{position}}
        {% endautoescape %}
    </div>
    <div class="remai fl">
        <h3>商品分类</h3>
        <div class="hotlist spfl">
            {% for v in catlist %}
            <div class="zhulei"><a href="/plist/{{v.id}}" class="sel">{{v.catname}}</a></div>
            <div class="clear"></div>
            <div class="zilei">
                {% for i in v.subcats %}
                <a href="/plist/{{i.id}}" class="sel">{{i.catname}}</a>
                {% endfor %}
                <div class="clear"></div>
            </div>
            {% endfor %}

        </div>
        <h3 class="mat10">热销排行</h3>
        <ul class="hotlist">
            {% for v in selllists %}
            <li>
                <span class="fl hotimg">
                    <img src="{{public}}/images/load.gif" data-original="{{res}}/product/{{v.logo}}" width="60" height="60" title="{{v.name}}" />
                </span>
                <span class="fl hotname">
					<a href="/product/{{v.id}}" title="{{v.name}}" target="_blank">{{v.name}}</a>
					<span class="cred num strong lh20">￥{{v.money}}</span>
				</span>
                <div class="clear"></div>
            </li>
            {% endfor %}
        </ul>
    </div>
    <div class="fr xiangqing" style="margin-top:0">
        <div class="caidan">
            <h3 class="fl">商品列表</h3>
            <ul class="fr">
                <li class="prolist_px">
                    <a href="/plist/{{pid}}">默认排序</a>
                </li>

                <li class="prolist_px">
                    {% if order.orderby == 'clicknum_asc' %}
                    <a href="/plist/{{pid}}?orderby=clicknum_desc{{name}}"><i class="i1"></i>按人气</a>
                    {% elseif order.orderby == 'clicknum_desc' %}
                    <a href="/plist/{{pid}}?orderby=clicknum_asc{{name}}"><i class="i2"></i>按人气</a>
                    {% else %}
                    <a href="/plist/{{pid}}?orderby=clicknum_desc{{name}}">按人气</a>
                    {% endif %}
                </li>

                <li class="prolist_px">
                    {% if order.orderby == 'sellnum_asc' %}
                    <a href="/plist/{{pid}}?orderby=sellnum_desc{{name}}"><i class="i1"></i>按销量</a>
                    {% elseif order.orderby == 'sellnum_desc' %}
                    <a href="/plist/{{pid}}?orderby=sellnum_asc{{name}}"><i class="i2"></i>按销量</a>
                    {% else %}
                    <a href="/plist/{{pid}}?orderby=sellnum_desc{{name}}">按销量</a>
                    {% endif %}
                </li>
                <li class="prolist_px">
                    {% if order.orderby == 'money_asc' %}
                    <a href="/plist/{{pid}}?orderby=money_desc{{name}}"><i class="i1"></i>按价格</a>
                    {% elseif order.orderby == 'money_desc' %}
                    <a href="/plist/{{pid}}?orderby=money_asc{{name}}"><i class="i2"></i>按价格</a>
                    {% else %}
                    <a href="/plist/{{pid}}?orderby=money_desc{{name}}">按价格</a>
                    {% endif %}
                </li>
            </ul>
            <div class="clear"></div>
        </div>
        <div class="prolist">
            {% for v in data %}
            <div class="prolist_1 prolist_border">
                <p class="prolist_img prolist_img1">
                    <a href="/product/{{v.id}}" title="{{v.name}}" target="_blank">
                        <img src="{{public}}/images/load.gif" data-original="{{res}}/product/{{v.logo}}"  width="150" height="150" title="{{v.name}}" style="display:block" />
                    </a>
                </p>
                <p class="prolist_name">
                    <a href="/product/{{v.id}}" title="{{v.name}}" target="_blank">{{v.name}}</a>
                </p>
                <p>
                    <span class="money1">￥ {{v.money}}</span> <s class="num c888">￥ {{v.smoney}}</s>
                </p>
            </div>
            {% endfor %}

        </div>
        <div class="clear"></div>
        <div class="mat15" style="text-align: center;margin:20px 0px">
            <style>
                ul.pagination {
                    display: inline-block;
                }
                .pagination li {
                    padding:2px 10px;
                    float:left;
                    text-align: center;
                    margin:0 5px;
                    background:#cccccc;
                }
                .pagination .active {
                    background:#FF922a;

                }
            </style>
            {% autoescape false %}
            {{fpage}}
            {% endautoescape %}
        </div>
    </div>
    <div class="clear"></div>
</div>


<!-- footer -->
{% include "public/footer.html"%}